package com.openbravo.data.gui.muleSelecter;

import java.awt.Component;

import javax.swing.DefaultListCellRenderer;
import javax.swing.JList;

public class MuleComboxBoxListCellRenderer extends DefaultListCellRenderer {
    
    /** Creates a new instance of ListCellRendererBasic */
    public MuleComboxBoxListCellRenderer() {
       
    }

    public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
        super.getListCellRendererComponent(list, null, index, isSelected, cellHasFocus);
        
        MuleComboBoxValEntry entry=(MuleComboBoxValEntry)value;
        setText(entry.isSelected() ? "*"+entry.getM_sValue() : entry.getM_sValue()); // Un espacio en caso de nulo para que no deja la celda chiquitita.
        return this;
    }        
 
}

